/**
 * Created by zhangpeng on 2017/6/21.
 */


/**
 * 相同列 合并单元格
 * @param tableId
 */
function heBing(tableId){
    var tableData = new Array();
    $("#"+tableId+" tr").each(function(trindex,tritem){
        tableData[trindex]=new Array();
        $(tritem).find("td").each(function(tdindex,tditem){
            tableData[trindex][tdindex]=$(tditem).text();
        });
    });
    console.log(tableData)
    var tab = document.getElementById(""+tableId+"");

    var lingyu = tableData[1][0];
    var j = 1;
    var k = 1;
    for(var i =2;i<tableData.length;i++){
        if(lingyu==tableData[i][0]){
            j++;
        }else{
            for (var m = k+1; m <= k+j-1; m++) {
                tab.rows[m].cells[0].style.display = "none";
            }
            tab.rows[k].cells[0].rowSpan = j;
            lingyu=tableData[i][0];
            k=k+j;
            j=1;
        }
    }


}